package com.itheima.tanhua.api;

import com.itheima.tanhua.domain.Score;

import java.util.List;

/**
 * @author Lff
 * @date 2022/4/8
 */
public interface ScoreApi {
    /**
     * 查询用户最高通关数
     * @param uid
     * @return
     */
    Score getMaxCheckPoint(Long uid);

    /**
     * 根据用户id 和过关的关卡点来查询用户成绩
     * @param id
     * @param checkpoints
     * @return
     */
    Score findByUserIdAndCheckPoint(Long id, Integer checkpoints);

    /**
     * 保存Score记录
     * @param score
     * @return
     */
    boolean save(Score score);

    //根据报告Id查询评分
    List<Score> findScoreByScopeToList(Long personalityId);


    /**
     * 通过给定的条件查询Score
     * @param condition
     * @return
     */
    List<Score> findOneByCondition(Score condition);

    Score findByCheckPointAndUserId(int i, Long id);

    //根据id修改
    void update(Score score);
}
